﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Teacher.Master" AutoEventWireup="true" CodeBehind="TeacherSelStu.aspx.cs" Inherits="WebSystem.TeacherSelStu" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;
<p>
    &nbsp;
    <asp:Label ID="Label2" runat="server" Text="输入班级："></asp:Label>
    &nbsp;<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
</p>
<p>
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    <asp:Button ID="Button3" runat="server" OnClick="Button3_Click" Text="显示数据" />
    &nbsp;</p>
<p>
    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataKeyNames="Sno,Cno" DataSourceID="SqlDataSource1">
        <Columns>
            <asp:BoundField DataField="Sno" HeaderText="学号" ReadOnly="True" SortExpression="Sno" />
            <asp:BoundField DataField="Sname" HeaderText="姓名" SortExpression="Sname" />
            <asp:BoundField DataField="Cno" HeaderText="科目号" ReadOnly="True" SortExpression="Cno" />
            <asp:BoundField DataField="Cname" HeaderText="科目" SortExpression="Cname" />
            <asp:BoundField DataField="grade" HeaderText="成绩" SortExpression="grade" />
        </Columns>
    </asp:GridView>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:dhd2014115121ConnectionString %>" SelectCommand="SELECT [Sno], [Sname], [Cno], [Cname], [grade] FROM [Score] WHERE ([Classno] = @Classno)">
        <SelectParameters>
            <asp:ControlParameter ControlID="TextBox1" Name="Classno" PropertyName="Text" Type="String" />
        </SelectParameters>
    </asp:SqlDataSource>
</p>
</asp:Content>


